package cn.rongdao.jrkabao.ui.cashadvance.uicomponent;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.mifengkong.frtools.util.FRString;

import cn.rongdao.jrkabao.R;

/**
 * Created by jack on 2017/11/6
 */

public class DialogFromBottomHeader extends RelativeLayout {
    public DialogFromBottomHeader(Context context) {
        super(context);
    }

    public DialogFromBottomHeader(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public DialogFromBottomHeader(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    private TextView tvName;
    private ImageView ivClose;

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        tvName = (TextView) findViewById(R.id.dfbh_tv_name);
        ivClose = (ImageView) findViewById(R.id.dfbh_iv_close);
    }

    public void setNameAndOnClickListener(String name, OnClickListener onClickListener) {
        tvName.setText(FRString.valueOf(name));
        ivClose.setOnClickListener(onClickListener);
    }
}
